package pl.com.britenet.myredmine.dao.mdb.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Domain class for table CO_ROLE.
 * 
 * @author <a href="mailto:pawel.sprysak@britenet.com.pl">Paweł Sprysak</a>
 * 
 */
@Entity
@Cache(region = "permanent", usage = CacheConcurrencyStrategy.READ_WRITE)
//TODO: Make annotation and LightEntity
//@GenService
@Table(name = "CO_ROLE")
public class CoRole implements Serializable {  //extends LightEntity

    /**
     * Serial number.
     */
    private static final long serialVersionUID = 53940123401234010L;

    /**
     * Id.
     */
    @Id
    @GeneratedValue(generator = "native")
    @GenericGenerator(name = "native", strategy = "native", parameters = { @Parameter(name = "sequence", value = "SEQ_PROJECT_ID") })
    @Column(name = "ID", nullable = false)
    private Integer id;
    
    /**
     * Name.
     */
    @Column(name = "ROLE_NAME")
    private String role_name;
    
    /**
     * Setter for property "id".
     * 
     * @param id
     *            Value of property "id".
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Getter for property "id".
     * 
     * @return Value of property "id".
     */
    public Integer getId() {
        return id;
    }

    /**
     * Setter for property "role_name".
     * 
     * @param role_name
     *            Value of property "role_name".
     */
	public void setRoleName(String role_name) {
		this.role_name = role_name;
	}

    /**
     * Getter for property "role_name".
     * 
     * @return Value of property "role_name".
     */
	public String getRoleName() {
		return role_name;
	}
}
